#pragma once

#include "SentenceNode.h"

class CExpressionNode;

//a sentence that just contains a expression
//for example:
//    1;
//this is a sentence , but only have a expression "1"
class CExpressionSentence: public CSentenceNode
{
public:
    CExpressionSentence(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile,EASTNodeType::ExpressionSentence)
    {
    }

    CExpressionSentence(std::weak_ptr<CScriptFileContext> InFile,std::shared_ptr<CExpressionNode> InExpression)
        : CSentenceNode(InFile,EASTNodeType::ExpressionSentence)
        , Expression(InExpression)
    {
    }

    std::shared_ptr<CExpressionNode> Expression;

    virtual void DebugPrint(int32_t InDepth) override;
    virtual std::shared_ptr<CScriptToken> GetFirstToken() override;

};